can we pass functions in props